﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Enter键实现Tab键功能</title>
    <script type="text/javascript" language="JavaScript">
        function changeFocus()
        {
            if(event.keyCode===13)
                event.keyCode=9;
        }
    </script>
</head>
<body>
<table id="mytbl" width="300" height="50" border="0" cellspacing="2" cellpadding="0" bgcolor="#FFb609">
    <tr>
        <td> <input type=text id="txt1" onkeydown="changeFocus()" /></td>
        <td>  <input type=text id="txt2" onkeydown="changeFocus()"  /></td>
    </tr>
    <tr>
        <td>  <input type=text id="txt3"  onkeydown="changeFocus()" /></td>
        <td>  <input type=text id="txt4" onkeydown="changeFocus()" /></td>
    </tr>
</table>

</body>
</html>